package com.dlry.serviceImpl;

import java.util.List;

import org.springframework.data.domain.Page;

import com.dlry.entity.DlLeave;
import com.dlry.entity.DlLoginuser;
import com.dlry.entity.DlNotification;
import com.dlry.entity.DlTravelRequest;
import com.dlry.exception.UserNotFoundException;

public interface UserService {
	void save(String userName, String password, String phoneNumber, String inEmail, String realName);

	void save(DlLoginuser user) throws Exception;

	void update(Long uId, String password, String phoneNumber, String inEmail, Boolean enabled, String realName);

	void update(DlLoginuser user);

	List<DlNotification> getNotificationsPagedById(Long uId, Integer page, Integer row);

	List<DlLeave> getLeavesPagedById(Long uId, Integer page, Integer row);

	List<DlTravelRequest> getTravelRequestsPagedById(Long uId, Integer page, Integer row);

	DlLoginuser findByName(String name);

	DlLoginuser findOne(Long id);

	Long getCountNotificationById(Long uId);

	Long getCountTravelById(Long uId);

	Long getCountLeaveById(Long uId);

	void changeUserPassword(Long uId, String password);

	Page<DlLoginuser> findAll(Integer page, Integer rows);

	DlLoginuser findSuperior(Long id) throws UserNotFoundException;

	DlLoginuser findSuperior(DlLoginuser user) throws UserNotFoundException;

	List<String> findAllBranch();
}
